﻿<Window x:Class="TestVisioCanvas.MainSample"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:visio="clr-namespace:AxMicrosoft.Office.Interop.VisOcx;assembly=AxInterop.Microsoft.Office.Interop.VisOcx"
        Title="MainSample" WindowState="Maximized" Height="800" Width="1200" MinHeight="800" MinWidth="1200">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.15*" />
            <ColumnDefinition Width="0.58*" />
            <ColumnDefinition Width="0.27*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="0.15*" />
            <RowDefinition Height="0.85*" />               
        </Grid.RowDefinitions>
        <ListBox Grid.Row="1" Width="180"
            HorizontalAlignment="Left" Name="listBox1" Grid.ColumnSpan="2" Height="647" 
            VerticalAlignment="Top">
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel Width="{Binding ElementName=listBox1, Path=Width}"/>
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
            <ListBoxItem Width="80" Height="120" Margin="4">
                <StackPanel>
                    <Grid Width="80" Height="90">
                        <Border BorderThickness="4" BorderBrush="Gray" Width="80" Height="80"/>
                    </Grid>
                    <TextBlock Text="Stanza" FontSize="18" HorizontalAlignment="Center"></TextBlock>
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem Width="80" Height="120">
                <StackPanel>
                    <Grid Width="80" Height="90">
                        <Rectangle Width="100" Height="40" Fill="Maroon"/>
                    </Grid>
                    <TextBlock Text="Tavolo" FontSize="18" HorizontalAlignment="Center"></TextBlock>
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem Width="80" Height="120" Margin="4">
                <StackPanel>
                    <Grid Width="80" Height="90">
                        <Border BorderThickness="4" BorderBrush="Gray" Width="80" Height="80"/>
                    </Grid>
                    <TextBlock Text="Stanza" FontSize="18" HorizontalAlignment="Center"></TextBlock>
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem Width="80" Height="120">
                <StackPanel>
                    <Grid Width="80" Height="90">
                        <Rectangle Width="100" Height="40" Fill="Maroon"/>
                    </Grid>
                    <TextBlock Text="Tavolo" FontSize="18" HorizontalAlignment="Center"></TextBlock>
                </StackPanel>
            </ListBoxItem>
        </ListBox>

        <ListBox Grid.Row="1" Grid.Column="2" VirtualizingStackPanel.IsVirtualizing="True"
            Height="616" HorizontalAlignment="Left" Name="listBox2" VerticalAlignment="Top" Width="324"
            ScrollViewer.HorizontalScrollBarVisibility="Disabled">
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel Width="320"/>
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
            <ListBoxItem>
                <StackPanel>
                    <Image Width="100" Height="100" Source="/TestVisioCanvas;component/Images/aeron.png" />
                    <Border Background="Black">
                        <TextBlock Foreground="White" FontSize="20" Text="Aeron" HorizontalAlignment="Center"/>
                    </Border>
                </StackPanel>                
            </ListBoxItem>
            <ListBoxItem>
                <StackPanel>
                    <Image Width="100" Height="100" Source="/TestVisioCanvas;component/Images/aeron.png" />
                    <Border Background="Black">
                        <TextBlock Foreground="White" FontSize="20" Text="Aeron" HorizontalAlignment="Center"/>
                    </Border>
                </StackPanel>
            </ListBoxItem>

            <ListBoxItem>
                <StackPanel>
                    <Image Width="100" Height="100" Source="/TestVisioCanvas;component/Images/aeron.png" />
                    <Border Background="Black">
                        <TextBlock Foreground="White" FontSize="20" Text="Aeron" HorizontalAlignment="Center"/>
                    </Border>
                </StackPanel>
            </ListBoxItem>

            <ListBoxItem>
                <StackPanel>
                    <Image Width="100" Height="100" Source="/TestVisioCanvas;component/Images/aeron.png" />
                    <Border Background="Black">
                        <TextBlock Foreground="White" FontSize="20" Text="Aeron" HorizontalAlignment="Center"/>
                    </Border>
                </StackPanel>
            </ListBoxItem>

            <ListBoxItem>
                <StackPanel>
                    <Image Width="100" Height="100" Source="/TestVisioCanvas;component/Images/aeron.png" />
                    <Border Background="Black">
                        <TextBlock Foreground="White" FontSize="20" Text="Aeron" HorizontalAlignment="Center"/>
                    </Border>
                </StackPanel>
            </ListBoxItem>

            <ListBoxItem>
                <StackPanel>
                    <Image Width="100" Height="100" Source="/TestVisioCanvas;component/Images/aeron.png" />
                    <Border Background="Black">
                        <TextBlock Foreground="White" FontSize="20" Text="Aeron" HorizontalAlignment="Center"/>
                    </Border>
                </StackPanel>
            </ListBoxItem>

            <ListBoxItem>
                <StackPanel>
                    <Image Width="100" Height="100" Source="/TestVisioCanvas;component/Images/aeron.png" />
                    <Border Background="Black">
                        <TextBlock Foreground="White" FontSize="20" Text="Aeron" HorizontalAlignment="Center"/>
                    </Border>
                </StackPanel>
            </ListBoxItem>

            <ListBoxItem>
                <StackPanel>
                    <Image Width="100" Height="100" Source="/TestVisioCanvas;component/Images/aeron.png" />
                    <Border Background="Black">
                        <TextBlock Foreground="White" FontSize="20" Text="Aeron" HorizontalAlignment="Center"/>
                    </Border>
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem>
                <StackPanel>
                    <Image Width="100" Height="100" Source="/TestVisioCanvas;component/Images/aeron.png" />
                    <Border Background="Black">
                        <TextBlock Foreground="White" FontSize="20" Text="Aeron" HorizontalAlignment="Center"/>
                    </Border>
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem>
                <StackPanel>
                    <Image Width="100" Height="100" Source="/TestVisioCanvas;component/Images/aeron.png" />
                    <Border Background="Black">
                        <TextBlock Foreground="White" FontSize="20" Text="Aeron" HorizontalAlignment="Center"/>
                    </Border>
                </StackPanel>
            </ListBoxItem>

            <ListBoxItem>
                <StackPanel>
                    <Image Width="100" Height="100" Source="/TestVisioCanvas;component/Images/aeron.png" />
                    <Border Background="Black">
                        <TextBlock Foreground="White" FontSize="20" Text="Aeron" HorizontalAlignment="Center"/>
                    </Border>
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem>
                <StackPanel>
                    <Image Width="100" Height="100" Source="/TestVisioCanvas;component/Images/aeron.png" />
                    <Border Background="Black">
                        <TextBlock Foreground="White" FontSize="20" Text="Aeron" HorizontalAlignment="Center"/>
                    </Border>
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem>
                <StackPanel>
                    <Image Width="100" Height="100" Source="/TestVisioCanvas;component/Images/aeron.png" />
                    <Border Background="Black">
                        <TextBlock Foreground="White" FontSize="20" Text="Aeron" HorizontalAlignment="Center"/>
                    </Border>
                </StackPanel>
            </ListBoxItem>

            <ListBoxItem>
                <StackPanel>
                    <Image Width="100" Height="100" Source="/TestVisioCanvas;component/Images/aeron.png" />
                    <Border Background="Black">
                        <TextBlock Foreground="White" FontSize="20" Text="Aeron" HorizontalAlignment="Center"/>
                    </Border>
                </StackPanel>
            </ListBoxItem>
        </ListBox >
        <Image Grid.Column="1"
            Height="115" HorizontalAlignment="Left" Name="image1" Stretch="Uniform" VerticalAlignment="Top" Width="463" Source="/TestVisioCanvas;component/Images/Logo.jpg" Grid.ColumnSpan="2" Margin="539,0,0,0" Grid.RowSpan="2" />
        <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
            Height="115" HorizontalAlignment="Left" Name="textBlock1" Text="Intestazione - Info Cliente" 
            VerticalAlignment="Top" Width="679" FontSize="32" />
        <WindowsFormsHost Grid.Row="1" Grid.Column="1"
            Name="_WFHost">
            <visio:AxDrawingControl x:Name="_drawingControl" />
        </WindowsFormsHost>
    </Grid>
</Window>
